﻿


using System;
using System.Text;
using System.Collections;
using System.Xml;
using System.Data;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using System.Resources;
using System.Reflection;
using System.Globalization;
using System.Threading;

using Telerik.WebControls;
using UFSoft.UBF.UI.WebControls;
using UFSoft.UBF.UI.WebControls.InterActionComponenet;
using UFSoft.UBF.Util.Log;
using UFSoft.UBF.Util.Context;

//using MagicAjax.UI.Controls;
using UFSoft.UBF.Report.UI.ReportView.Web;
using UFSoft.UBF.UI.WebControlAdapter;
using UFSoft.UBF.UI.FormProcess;
using UFSoft.UBF.UI.IView;
using UFSoft.UBF.UI.Engine;
using UFSoft.UBF.UI.Engine.Builder;
using UFSoft.UBF.UI.Engine.Authorization;
using UFSoft.UBF.UI.MD.Runtime;
using UFSoft.UBF.UI.ActionProcess;
using UFSoft.UBF.UI.ControlModel;
using UFSoft.UBF.UI.Controls;
using UFSoft.UBF.UI.WebControls.Association;
using UFSoft.UBF.UI.WebControls.ClientCallBack;
using System.Web.UI;
using UFSoft.UBF.UI.UIFormPersonalization;
using System.Collections.Specialized;


/***********************************************************************************************
 * Form ID:1f505cd8-31e1-4c80-bc84-5f124f55e940 
 * Form Name:CreateAPBilListUIForm
 * UIFactory Auto Generator
 ***********************************************************************************************/
namespace UFIDA.U9.Cust.HWProject.CreateAPBillHead.CreateAPBilListUIModel
{
	[FormRegister("UFIDA.U9.Cust.HWProject.CreateAPBillHead.CreateAPBilListUI","UFIDA.U9.Cust.HWProject.CreateAPBillHead.CreateAPBilListUIModel.CreateAPBilListUIFormWebPart", "UFIDA.U9.Cust.HWProject.CreateAPBillHead.CreateAPBilListUI.WebPart", "1f505cd8-31e1-4c80-bc84-5f124f55e940","WebPart", "True", 1064, 552)] 
	///insert into aspnet_Parts (SysVersion, Path, ClassName, [Assembly], FormId) values (0, 'UFIDA.U9.Cust.HWProject.CreateAPBillHead.CreateAPBilListUI', 'UFIDA.U9.Cust.HWProject.CreateAPBillHead.CreateAPBilListUIModel.CreateAPBilListUIFormWebPart', 'UFIDA.U9.Cust.HWProject.CreateAPBillHead.CreateAPBilListUI.WebPart', '1f505cd8-31e1-4c80-bc84-5f124f55e940')
	///<siteMapNode url="~/erp/simple.aspx?lnk=1f505cd8-31e1-4c80-bc84-5f124f55e940" title="CreateAPBilListUIForm"/>
    public partial class CreateAPBilListUIFormWebPart : UFSoft.UBF.UI.FormProcess.BaseWebForm
    {
		#region Page Controller/Code Behind
        private static readonly ILogger logger = LoggerManager.GetLogger(typeof(CreateAPBilListUIFormWebPart));
        private string assemblyName = System.Reflection.Assembly.GetExecutingAssembly().FullName;
        //private string displayNamePostfix = "displayName";

		#region 强类型化基类属性.
		public new CreateAPBilListUIModelAction Action
		{
			get { return (CreateAPBilListUIModelAction)base.Action; }
			set { base.Action = value; }
		}
		CreateAPBilListUIModelModel _uimodel=null;
		public new CreateAPBilListUIModelModel Model
		{
			get 
			{
			     if(_uimodel == null){
			          _uimodel = new CreateAPBilListUIModelModel();
			     }
			     return _uimodel; 
			}
			set { _uimodel = value; }
		}
        protected override IUIModel UIModel{
            get{
                return this.Model;
            }
            set{
                this.Model = value as CreateAPBilListUIModelModel;
            }
        }
		#endregion 
		public FormAdjust adjust;
        #region variable declaration
        IUFCard Card3;
        IUFDataGrid DataGrid;
        IUFDataGrid DataGrid10;
        IUFCard Card4;
        IUFButton OnSelect;
        IUFButton OnToSRM;
		UpdatePanel updatePanel;
		HiddenField wpFindID;
		IUFContainer topLevelPanel;     
        IUFSeparator SeparatorInFavorites;
        IUFButton BtnDefaultValues;
        #endregion
        
        #region constructor
        public CreateAPBilListUIFormWebPart()
        {
            FormID = "1f505cd8-31e1-4c80-bc84-5f124f55e940";
            IsAutoSize = bool.Parse("True");
        }
        #endregion


	
            
	//获取档案版型结果: 

        #region eventBind and databind
        private void EventBind()
        {
			//事件绑定模板
				//Grid控件事件
			((UFWebDataGridAdapter)this.DataGrid).GridRowClickedHandler += new GridRowClickedDelegate(DataGrid_GridRowClicked);
			//((UFWebDataGridAdapter)this.DataGrid).ClickAutoPostBack = true;
									
				//Button控件事件
			this.OnSelect.Click += new EventHandler(OnSelect_Click);		
						
				//Button控件事件
			this.OnToSRM.Click += new EventHandler(OnToSRM_Click);		
						

	
			//Grid控件的分页事件				
			((UFWebDataGridAdapter)this.DataGrid).GridMakePageEventHandler += new GridMakePageDelegate(UFGridDataGrid_GridMakePageEventHandler);
             //Grid控件的客户化筛选，定位事件
            ((UFWebDataGridAdapter)this.DataGrid).GridCustomFilterHandler += new GridCustomFilterDelegate(UFGridDataGrid_GridCustomFilterHandler);
	
			//Grid控件的分页事件				
			((UFWebDataGridAdapter)this.DataGrid10).GridMakePageEventHandler += new GridMakePageDelegate(UFGridDataGrid10_GridMakePageEventHandler);
             //Grid控件的客户化筛选，定位事件
            ((UFWebDataGridAdapter)this.DataGrid10).GridCustomFilterHandler += new GridCustomFilterDelegate(UFGridDataGrid10_GridCustomFilterHandler);

            AfterEventBind();
        }
        #endregion            
        
		#region override method
		protected override void OnLoad(EventArgs e)
		{
			base.OnLoad2(e);
		}
		protected override void OnLoadDataDo(EventArgs e)
		{
		    adjust.ProcessAdjustBeforeOnLoad(this);
			if (UIEngineHelper.IsDataBind(PageStatus, this))
			{
				if(this.Model==null){				        
					this.Model = new CreateAPBilListUIModelModel();
				}
				OnLoadConsumer(new InParameterModel[]{},new InParameterModel[]{});
				OnLoadData(this);
				this.IsDataBinding = true ; //加载完数据要绑定一次.目前加这.
			}
			else
			{
				//去除.已经移入到OnInit()中.
				//this.Model = (CreateAPBilListUIModelModel)this.CurrentState[this.TaskId.ToString()];
			}
			adjust.ProcessAdjustAfterOnLoadData(this);
		            AfterOnLoad();
            
            adjust.ProcessAdjustAfterOnLoad(this);
		}
		protected override void OnPreRender(EventArgs e)
		{
			base.OnPreRender2(e);
		}
        protected override void OnPreRenderDo(EventArgs e)
        {
            adjust.ProcessAdjustBeforeOnPreRender(this);
			base.OnPreRender(e);
			this.CurrentState[this.TaskId.ToString()] = this.Model;
			RegisterClearWebPartPadding();
            UFIDA.U9.UI.PDHelper.FormAuthorityHelper.SetWebPartAuthorization(this);
            
			if (IsDataBinding) //2006-9-7 可由开发人员控制
			{
				BeforeUIModelBinding();
								if(!Page.IsPostBack)
				{
					EnumTypeBinding.BindEnumControls(this);
				}
				UFIDA.U9.UI.Commands.CommandHelper.BindFlexData(this);
				adjust.ProcessAdjustBeforeDataBinding(this);
				if (this.IsOnlyDataBinding)
				{
					this.DataBinding();
				}
				adjust.ProcessAdjustAfterDataBinding(this);

				AfterUIModelBinding();
			}
			adjust.ProcessAdjustAfterOnPreRender(this);
        }
		protected override void OnInit(EventArgs e)
		{
			base.OnInit2(e);
		}
		protected override void OnInitDo(EventArgs e)
		{			 
			this.Page.InitComplete += new EventHandler(Page_InitComplete);
			WebPartBuilder.InitWebPart(this);
            this.Action = new CreateAPBilListUIModelAction(this);
            adjust = new FormAdjust();
		    CreateFormChildControls();
		}
        void Page_InitComplete(object sender, EventArgs e)
        {

            adjust.ProcessInit(this);
        }
        #endregion

      
        
        #endregion

	
		/// <summary>
        /// WebPart View
        /// </summary>
        #region view Create Contorls
        private void CreateFormChildControls()
        {
            IUFContainer _panel = UIControlBuilder.BuildTopLevelContainer(this,"CreateAPBilListUIForm",true,1064,552);
            CommonBuilder.ContainerGridLayoutPropBuilder(_panel, 1, 3, 0, 10, 0, 0, 0, 5);
			InitViewBindingContainer(this, _panel,  null, "", "", null, 1, "");
			UIControlBuilder.BuildContainerGridLayout(_panel, 10,new GridColumnDef[]{new GridColumnDef(992,bool.Parse("False")),},new GridRowDef[]{new GridRowDef(1,bool.Parse("True")),new GridRowDef(433,bool.Parse("False")),new GridRowDef(1,bool.Parse("True")),});
            //???还有用么?
            topLevelPanel = _panel;    
            
            UIControlBuilder.BuildCommonControls(this,ref updatePanel,ref wpFindID);
            





	
			_BuilderControl_Card3(_panel);

		
			UIControlBuilder.BuilderUFControl(this.Card3, "1");		



	
     
			
			
            EventBind();
            AfterCreateChildControls();
            
        }        







	                   
        private IUFCard _BuilderControl_Card3(IUFContainer container)
        {
            IUFCard _UFCard = UIControlBuilder.BuildCard(container,"Card3",false,"none", true, true, "1","","e0a21560-33a7-47ff-98ec-8cd96ffb5065");
			CommonBuilder.GridLayoutPropBuilder(container, _UFCard, 992, 433, 0, 1, 1, 1, "100");
            CommonBuilder.ContainerGridLayoutPropBuilder(_UFCard, 2, 3, 0, 10, 10, 0, 10, 0);
			InitViewBindingContainer(this, _UFCard,  null, "", "", null, 1, "");
			UIControlBuilder.BuildContainerGridLayout(_UFCard, 10,new GridColumnDef[]{new GridColumnDef(971,bool.Parse("True")),new GridColumnDef(1,bool.Parse("False")),},new GridRowDef[]{new GridRowDef(221,bool.Parse("False")),new GridRowDef(30,bool.Parse("True")),new GridRowDef(200,bool.Parse("True")),});
            this.Card3 = _UFCard;

            ///foreach UFCard下的所有控件，增加到此容器





	
			_BuilderControl_DataGrid(_UFCard);

		
			UIControlBuilder.BuilderUFControl(this.DataGrid, "1");		


	
			_BuilderControl_DataGrid10(_UFCard);

		
			UIControlBuilder.BuilderUFControl(this.DataGrid10, "3");		


	
			_BuilderControl_Card4(_UFCard);

		
			UIControlBuilder.BuilderUFControl(this.Card4, "0");		



			

            
            container.Controls.Add(_UFCard);
            return _UFCard;
        }

				





       
        private void _BuilderControl_DataGrid(IUFContainer container)
        {
            IUFDataGrid _UFGrid = UIControlBuilder.BuildGridControl("DataGrid", UFSoft.UBF.UI.ControlModel.EditStatus.Browse, false, false,false,false,false,true,20,true, false) ;
  			UIControlBuilder.BuilderUFControl(_UFGrid, "True", "True", "1");
			CommonBuilder.GridLayoutPropBuilder(container, _UFGrid, 972, 221, 0, 0, 2, 1, "100");
			InitViewBindingContainer(this, _UFGrid,  this.Model.APbilHead, "APbilHead", "", null, 20, "应付单表头");
			((UFSoft.UBF.UI.WebControlAdapter.UFWebDataGridAdapter)_UFGrid).PagingStrategy=UFSoft.UBF.UI.ControlModel.GridPagingStrategy.Auto;
			_UFGrid.AllowSelectAllPage=false;
			((UFSoft.UBF.UI.WebControls.UFGrid)_UFGrid).IsSumAllData=false;
		        ((UFSoft.UBF.UI.WebControls.UFGrid)_UFGrid).IsSumSelectedData=false;
            this.DataGrid = _UFGrid;
            container.Controls.Add(_UFGrid);



			IUFDataGridColumn column ;
			GridColumn gridColumn ;
	                     
			column = GridControlBuilder.GridColumnBuilder(_UFGrid,"Org0","TextBoxColumnModel", "", 0,this.Model.APbilHead.Fields["Org"]/*Org*/,"Org", false, true, true, false, false, true, 0, 100, "50",true, false,"","f0e1b002-556f-4dbe-bb0a-f2b628ed8e3d","f0e1b002-556f-4dbe-bb0a-f2b628ed8e3d","7057571b-270e-4a22-956e-2a7c768ba8e8");
         
			GridControlBuilder.GridTextBoxColumnBuilder((IUFTextBoxColumn)column,"",TextAlign.Left, false,"",false,"1","1","50") ;          
	  
		 	                     
			column = GridControlBuilder.GridColumnBuilder(_UFGrid,"ID0","NumberColumnModel", "", 0,this.Model.APbilHead.Fields["ID"]/*ID*/,"ID", true, false, true, false, false, false, 7, 100, "19.0",true, false,"","39183a01-9f90-4a22-a80d-350dc15a29b0","39183a01-9f90-4a22-a80d-350dc15a29b0","fb63ffe8-6d1e-44bd-976c-58b6791436ec");
			GridControlBuilder.GridNumberColumnBuilder((IUFNumberColumn)column, NumbericType.Numberic, 79228162514264337593543950335m, -79228162514264337593543950335m, null, null, null, null
			,true,"",false,"1","1");
	  
		 	                     
			column = GridControlBuilder.GridColumnBuilder(_UFGrid,"CreatedOn0","DatePickerColumnModel", "", 0,this.Model.APbilHead.Fields["CreatedOn"]/*CreatedOn*/,"CreatedOn", false, false, true, false, false, true, 5, 70, "8",true, false,"","eb4319ab-e814-470b-ab28-dce0a63399a3","eb4319ab-e814-470b-ab28-dce0a63399a3","f1bbd348-74f8-4793-b93f-17de36134a1e");
                   
			((IUFDatePickerColumn)column).DateTimeType = DateTimeType.DateTime;
            ((IUFDatePickerColumn)column).DateTimeFormat = CurrentState._I18N._DateTimeFormatInfo;
	  
		 	                     
			column = GridControlBuilder.GridColumnBuilder(_UFGrid,"CreatedBy0","TextBoxColumnModel", "", 0,this.Model.APbilHead.Fields["CreatedBy"]/*CreatedBy*/,"CreatedBy", false, false, true, false, false, true, 0, 100, "50",true, false,"","46b60a7f-aeba-42a2-85e3-7b01bda516fe","46b60a7f-aeba-42a2-85e3-7b01bda516fe","e706038d-856d-4435-a216-008a3c797419");
         
			GridControlBuilder.GridTextBoxColumnBuilder((IUFTextBoxColumn)column,"",TextAlign.Left, false,"",false,"1","1","50") ;          
	  
		 	                     
			column = GridControlBuilder.GridColumnBuilder(_UFGrid,"ModifiedOn0","DatePickerColumnModel", "", 0,this.Model.APbilHead.Fields["ModifiedOn"]/*ModifiedOn*/,"ModifiedOn", false, false, true, false, false, true, 5, 70, "8",true, false,"","00d53db5-2166-4c8a-889e-d12c3113f6da","00d53db5-2166-4c8a-889e-d12c3113f6da","b9b8a4f4-fd8b-44f6-a399-87e2849e97d4");
                   
			((IUFDatePickerColumn)column).DateTimeType = DateTimeType.DateTime;
            ((IUFDatePickerColumn)column).DateTimeFormat = CurrentState._I18N._DateTimeFormatInfo;
	  
		 	                     
			column = GridControlBuilder.GridColumnBuilder(_UFGrid,"ModifiedBy0","TextBoxColumnModel", "", 0,this.Model.APbilHead.Fields["ModifiedBy"]/*ModifiedBy*/,"ModifiedBy", false, false, true, false, false, true, 0, 100, "50",true, false,"","50318148-bb5c-4a3a-86e4-9fa0bb57c4ec","50318148-bb5c-4a3a-86e4-9fa0bb57c4ec","fe18796d-66d8-445b-91a7-fe67f1f107f8");
         
			GridControlBuilder.GridTextBoxColumnBuilder((IUFTextBoxColumn)column,"",TextAlign.Left, false,"",false,"1","1","50") ;          
	  
		 	                     
			column = GridControlBuilder.GridColumnBuilder(_UFGrid,"SysVersion0","NumberColumnModel", "", 0,this.Model.APbilHead.Fields["SysVersion"]/*SysVersion*/,"SysVersion", false, false, true, false, false, true, 7, 100, "19.0",true, false,"0","9995d574-bf1d-4f79-9da5-460e9c9f14cb","9995d574-bf1d-4f79-9da5-460e9c9f14cb","1ba76985-99b4-4ff5-a68e-715180ef8178");
			GridControlBuilder.GridNumberColumnBuilder((IUFNumberColumn)column, NumbericType.Numberic, 79228162514264337593543950335m, -79228162514264337593543950335m, null, null, null, null
			,true,"",false,"1","1");
	  
		 	                     
			column = GridControlBuilder.GridColumnBuilder(_UFGrid,"DocNo0","TextBoxColumnModel", "", 0,this.Model.APbilHead.Fields["DocNo"]/*DocNo*/,"DocNo", false, true, true, false, false, true, 0, 100, "50",true, false,"","b46f1b8b-84ed-499b-bd3b-52427dca9662","b46f1b8b-84ed-499b-bd3b-52427dca9662","e2630654-1651-4b89-9a79-6d61b7535fdf");
         
			GridControlBuilder.GridTextBoxColumnBuilder((IUFTextBoxColumn)column,"",TextAlign.Left, false,"",false,"1","1","50") ;          
	  
		 	                     
			column = GridControlBuilder.GridColumnBuilder(_UFGrid,"AccrueBy0","TextBoxColumnModel", "", 0,this.Model.APbilHead.Fields["AccrueBy"]/*AccrueBy*/,"AccrueBy", false, true, true, false, false, true, 0, 100, "50",true, false,"","067d6bea-d334-4cc7-a701-199eb2291245","067d6bea-d334-4cc7-a701-199eb2291245","b236a765-968d-4157-b31a-129d2e49572f");
         
			GridControlBuilder.GridTextBoxColumnBuilder((IUFTextBoxColumn)column,"",TextAlign.Left, false,"",false,"1","1","50") ;          
	  
		 	                     
			column = GridControlBuilder.GridColumnBuilder(_UFGrid,"SrcDocNo0","TextBoxColumnModel", "", 0,this.Model.APbilHead.Fields["SrcDocNo"]/*SrcDocNo*/,"SrcDocNo", false, true, true, false, false, true, 0, 100, "50",true, false,"","2d634021-d2be-45fd-8cf9-7128bb3aee8f","2d634021-d2be-45fd-8cf9-7128bb3aee8f","4c94bec9-f05d-4b8e-9bce-e530cc7d509a");
         
			GridControlBuilder.GridTextBoxColumnBuilder((IUFTextBoxColumn)column,"",TextAlign.Left, false,"",false,"1","1","50") ;          
	  
		 	                     
			column = GridControlBuilder.GridColumnBuilder(_UFGrid,"AC0","TextBoxColumnModel", "", 0,this.Model.APbilHead.Fields["AC"]/*AC*/,"AC", false, true, true, false, false, true, 0, 100, "50",true, false,"","442cb01e-65b9-422e-a463-f681ef8b47a6","442cb01e-65b9-422e-a463-f681ef8b47a6","fd20b93e-165c-4844-aabe-43f3ceee37b0");
         
			GridControlBuilder.GridTextBoxColumnBuilder((IUFTextBoxColumn)column,"",TextAlign.Left, false,"",false,"1","1","50") ;          
	  
		 	                     
			column = GridControlBuilder.GridColumnBuilder(_UFGrid,"DocType0","TextBoxColumnModel", "", 0,this.Model.APbilHead.Fields["DocType"]/*DocType*/,"DocType", false, true, true, false, false, true, 0, 100, "50",true, false,"","d522488d-79d1-4d44-9c7a-147834aa6982","d522488d-79d1-4d44-9c7a-147834aa6982","4bd66a0f-fec6-4893-a396-9e0b2b00be77");
         
			GridControlBuilder.GridTextBoxColumnBuilder((IUFTextBoxColumn)column,"",TextAlign.Left, false,"",false,"1","1","50") ;          
	  
		 	                     
			column = GridControlBuilder.GridColumnBuilder(_UFGrid,"InvoiceNum0","TextBoxColumnModel", "", 0,this.Model.APbilHead.Fields["InvoiceNum"]/*InvoiceNum*/,"InvoiceNum", false, true, true, false, false, true, 0, 100, "50",true, false,"","1474d6ad-302c-4ef7-ab75-e3472590e01d","1474d6ad-302c-4ef7-ab75-e3472590e01d","33e5c298-ce2a-480c-b68f-00fdb9975225");
         
			GridControlBuilder.GridTextBoxColumnBuilder((IUFTextBoxColumn)column,"",TextAlign.Left, false,"",false,"1","1","50") ;          
	  
		 	                     
			column = GridControlBuilder.GridColumnBuilder(_UFGrid,"InvoiceDate0","TextBoxColumnModel", "", 0,this.Model.APbilHead.Fields["InvoiceDate"]/*InvoiceDate*/,"InvoiceDate", false, true, true, false, false, true, 0, 100, "50",true, false,"","2862bd25-a7c7-4e14-a440-3cd7dd745f4f","2862bd25-a7c7-4e14-a440-3cd7dd745f4f","9a8cef79-fc82-466f-bbd1-fa17afb4da1b");
         
			GridControlBuilder.GridTextBoxColumnBuilder((IUFTextBoxColumn)column,"",TextAlign.Left, false,"",false,"1","1","50") ;          
	  
		 	                     
			column = GridControlBuilder.GridColumnBuilder(_UFGrid,"PaySupp0","TextBoxColumnModel", "", 0,this.Model.APbilHead.Fields["PaySupp"]/*PaySupp*/,"PaySupp", false, true, true, false, false, true, 0, 100, "50",true, false,"","9a3a39df-ba64-40fc-ab54-d6c8318adf84","9a3a39df-ba64-40fc-ab54-d6c8318adf84","c832ec6d-6c05-45f3-b892-e01f898a633a");
         
			GridControlBuilder.GridTextBoxColumnBuilder((IUFTextBoxColumn)column,"",TextAlign.Left, false,"",false,"1","1","50") ;          
	  
		 	                     
			column = GridControlBuilder.GridColumnBuilder(_UFGrid,"SupplierCode0","TextBoxColumnModel", "", 0,this.Model.APbilHead.Fields["SupplierCode"]/*SupplierCode*/,"SupplierCode", false, true, true, false, false, true, 0, 100, "50",true, false,"","8888c3a9-44d6-4355-98e3-ea3bbeb93170","8888c3a9-44d6-4355-98e3-ea3bbeb93170","37c4eaae-d40b-4eed-bba4-50501483b97b");
         
			GridControlBuilder.GridTextBoxColumnBuilder((IUFTextBoxColumn)column,"",TextAlign.Left, false,"",false,"1","1","50") ;          
	  
		 	                     
			column = GridControlBuilder.GridColumnBuilder(_UFGrid,"BusinessDate0","TextBoxColumnModel", "", 0,this.Model.APbilHead.Fields["BusinessDate"]/*BusinessDate*/,"BusinessDate", false, true, true, false, false, true, 0, 100, "50",true, false,"","5189696a-621c-46e3-920a-af1ffea6e690","5189696a-621c-46e3-920a-af1ffea6e690","fafaa823-8140-4ef3-b3c2-f2ed61386133");
         
			GridControlBuilder.GridTextBoxColumnBuilder((IUFTextBoxColumn)column,"",TextAlign.Left, false,"",false,"1","1","50") ;          
	  
		 	                     
			column = GridControlBuilder.GridColumnBuilder(_UFGrid,"AccrueDate0","TextBoxColumnModel", "", 0,this.Model.APbilHead.Fields["AccrueDate"]/*AccrueDate*/,"AccrueDate", false, true, true, false, false, true, 0, 100, "50",true, false,"","07532783-0a1f-481a-b018-0c813a904a3a","07532783-0a1f-481a-b018-0c813a904a3a","10ada4ec-3272-44fd-987a-85ac2937846b");
         
			GridControlBuilder.GridTextBoxColumnBuilder((IUFTextBoxColumn)column,"",TextAlign.Left, false,"",false,"1","1","50") ;          
	  
		 	                     
			column = GridControlBuilder.GridColumnBuilder(_UFGrid,"SrcSystemType0","TextBoxColumnModel", "", 0,this.Model.APbilHead.Fields["SrcSystemType"]/*SrcSystemType*/,"SrcSystemType", false, true, true, false, false, true, 0, 100, "50",true, false,"","7ea11463-7772-44dd-b30d-1626d81c9329","7ea11463-7772-44dd-b30d-1626d81c9329","9578c7d8-0405-41d0-8121-7388ad483fc4");
         
			GridControlBuilder.GridTextBoxColumnBuilder((IUFTextBoxColumn)column,"",TextAlign.Left, false,"",false,"1","1","50") ;          
	  
		 	                     
			column = GridControlBuilder.GridColumnBuilder(_UFGrid,"IsSuccess0","CheckBoxColumnModel", "", 0,this.Model.APbilHead.Fields["IsSuccess"]/*IsSuccess*/,"IsSuccess", false, true, true, false, false, true, 22, 100, "1",true, false,"false","e2a2b6b7-5b45-4af6-b8e9-974f64532351","e2a2b6b7-5b45-4af6-b8e9-974f64532351","aab7546f-16d3-471e-8c34-824cecd36745");
	  
		 	                     
			column = GridControlBuilder.GridColumnBuilder(_UFGrid,"OrderStatus0","DropDownListColumnModel", "", 0,this.Model.APbilHead.Fields["OrderStatus"]/*OrderStatus*/,"OrderStatus", false, true, true, false, false, true, 2, 100, "10.0",true, false,"0","21538101-cace-47b9-9deb-e33c66b3a32c","21538101-cace-47b9-9deb-e33c66b3a32c","ab9a27c2-6315-4735-b757-0059b81fc866");
			((IUFDropDownListColumn)column).EnumTypeID  = "UFIDA.U9.Cust.HWProject.CreateAPBillHead.APBil.APBilOrderStatusEnum";
			EnumTypeList.Add("UFIDA.U9.Cust.HWProject.CreateAPBillHead.APBil.APBilOrderStatusEnum");
			EnumControlsMap.Add(column, _UFGrid);
			  
		 
        }

				





       
        private void _BuilderControl_DataGrid10(IUFContainer container)
        {
            IUFDataGrid _UFGrid = UIControlBuilder.BuildGridControl("DataGrid10", UFSoft.UBF.UI.ControlModel.EditStatus.Browse, false, false,false,false,false,true,20,false, false) ;
  			UIControlBuilder.BuilderUFControl(_UFGrid, "True", "True", "3");
			CommonBuilder.GridLayoutPropBuilder(container, _UFGrid, 972, 200, 0, 2, 2, 1, "100");
			InitViewBindingContainer(this, _UFGrid,  this.Model.APbilHead_APbilLine, "APbilHead_APbilLine", "", null, 20, "应付单表头.Misc.应付单表行");
			((UFSoft.UBF.UI.WebControlAdapter.UFWebDataGridAdapter)_UFGrid).PagingStrategy=UFSoft.UBF.UI.ControlModel.GridPagingStrategy.Auto;
			_UFGrid.AllowSelectAllPage=false;
			((UFSoft.UBF.UI.WebControls.UFGrid)_UFGrid).IsSumAllData=false;
		        ((UFSoft.UBF.UI.WebControls.UFGrid)_UFGrid).IsSumSelectedData=false;
            this.DataGrid10 = _UFGrid;
            container.Controls.Add(_UFGrid);



			IUFDataGridColumn column ;
			GridColumn gridColumn ;
	                     
			column = GridControlBuilder.GridColumnBuilder(_UFGrid,"ItemCode0","TextBoxColumnModel", "", 0,this.Model.APbilHead_APbilLine.Fields["ItemCode"]/*ItemCode*/,"ItemCode", false, true, true, false, false, true, 0, 100, "50",true, false,"","50c40159-a1c5-4473-8a67-7c07ce5c5600","50c40159-a1c5-4473-8a67-7c07ce5c5600","41ad98e4-0e3a-44f5-b0d7-a02183cd57ed");
         
			GridControlBuilder.GridTextBoxColumnBuilder((IUFTextBoxColumn)column,"",TextAlign.Left, false,"",false,"1","1","50") ;          
	  
		 	                     
			column = GridControlBuilder.GridColumnBuilder(_UFGrid,"Qty0","TextBoxColumnModel", "", 0,this.Model.APbilHead_APbilLine.Fields["Qty"]/*Qty*/,"Qty", false, true, true, false, false, true, 0, 100, "50",true, false,"","ab88803c-74b1-4687-802c-8c7b6d0ea2c6","ab88803c-74b1-4687-802c-8c7b6d0ea2c6","480c566b-811e-4312-920f-dc0e62df84e6");
         
			GridControlBuilder.GridTextBoxColumnBuilder((IUFTextBoxColumn)column,"",TextAlign.Left, false,"",false,"1","1","50") ;          
	  
		 	                     
			column = GridControlBuilder.GridColumnBuilder(_UFGrid,"SrcDocNo1","TextBoxColumnModel", "", 0,this.Model.APbilHead_APbilLine.Fields["SrcDocNo"]/*SrcDocNo*/,"SrcDocNo", false, true, true, false, false, true, 0, 100, "50",true, false,"","2261a08e-971d-4ec6-8c76-2c4d2ebbb22b","2261a08e-971d-4ec6-8c76-2c4d2ebbb22b","8e7013f7-9ed2-4302-91f5-135fe1a1dc54");
         
			GridControlBuilder.GridTextBoxColumnBuilder((IUFTextBoxColumn)column,"",TextAlign.Left, false,"",false,"1","1","50") ;          
	  
		 	                     
			column = GridControlBuilder.GridColumnBuilder(_UFGrid,"SrcDocLineNo0","TextBoxColumnModel", "", 0,this.Model.APbilHead_APbilLine.Fields["SrcDocLineNo"]/*SrcDocLineNo*/,"SrcDocLineNo", false, true, true, false, false, true, 0, 100, "50",true, false,"","8409f0d7-1551-4360-a906-a736c08f392c","8409f0d7-1551-4360-a906-a736c08f392c","605a7f81-8b8e-41f9-9502-f2f616d33c56");
         
			GridControlBuilder.GridTextBoxColumnBuilder((IUFTextBoxColumn)column,"",TextAlign.Left, false,"",false,"1","1","50") ;          
	  
		 	                     
			column = GridControlBuilder.GridColumnBuilder(_UFGrid,"ShipmentDate0","TextBoxColumnModel", "", 0,this.Model.APbilHead_APbilLine.Fields["ShipmentDate"]/*ShipmentDate*/,"ShipmentDate", false, true, true, false, false, true, 0, 100, "50",true, false,"","d46555f5-254a-45f2-bc08-b096add2312b","d46555f5-254a-45f2-bc08-b096add2312b","4bb13e09-dab5-4d58-9019-ff73ffc811ef");
         
			GridControlBuilder.GridTextBoxColumnBuilder((IUFTextBoxColumn)column,"",TextAlign.Left, false,"",false,"1","1","50") ;          
	  
		 	                     
			column = GridControlBuilder.GridColumnBuilder(_UFGrid,"Price0","TextBoxColumnModel", "", 0,this.Model.APbilHead_APbilLine.Fields["Price"]/*Price*/,"Price", false, true, true, false, false, true, 0, 100, "50",true, false,"","b29cca31-c0b6-4478-a60a-bf9a8c28cfea","b29cca31-c0b6-4478-a60a-bf9a8c28cfea","fd185c2b-2b33-44aa-b733-5dace765cd0c");
         
			GridControlBuilder.GridTextBoxColumnBuilder((IUFTextBoxColumn)column,"",TextAlign.Left, false,"",false,"1","1","50") ;          
	  
		 	                     
			column = GridControlBuilder.GridColumnBuilder(_UFGrid,"TaxSchedule0","TextBoxColumnModel", "", 0,this.Model.APbilHead_APbilLine.Fields["TaxSchedule"]/*TaxSchedule*/,"TaxSchedule", false, true, true, false, false, true, 0, 100, "50",true, false,"","c0f49b99-0e24-43d0-ad25-fdcefb5c835d","c0f49b99-0e24-43d0-ad25-fdcefb5c835d","1e5a2026-6131-4ff2-8450-afee35101384");
         
			GridControlBuilder.GridTextBoxColumnBuilder((IUFTextBoxColumn)column,"",TextAlign.Left, false,"",false,"1","1","50") ;          
	  
		 	                     
			column = GridControlBuilder.GridColumnBuilder(_UFGrid,"WhCode0","TextBoxColumnModel", "", 0,this.Model.APbilHead_APbilLine.Fields["WhCode"]/*WhCode*/,"WhCode", false, true, true, false, false, true, 0, 100, "50",true, false,"","55e2886b-8bfc-49d6-8b8b-6ed9b8fe7206","55e2886b-8bfc-49d6-8b8b-6ed9b8fe7206","e729519a-b475-4c50-b8fd-1dd4c6205504");
         
			GridControlBuilder.GridTextBoxColumnBuilder((IUFTextBoxColumn)column,"",TextAlign.Left, false,"",false,"1","1","50") ;          
	  
		 	                     
			column = GridControlBuilder.GridColumnBuilder(_UFGrid,"IsToSRM0","CheckBoxColumnModel", "", 0,this.Model.APbilHead_APbilLine.Fields["IsToSRM"]/*IsToSRM*/,"IsToSRM", false, true, true, false, false, true, 22, 25, "1",true, false,"false","efbf889e-9b06-4e86-bcdd-f862b209e4bb","efbf889e-9b06-4e86-bcdd-f862b209e4bb","495aee7c-6d42-44f2-9808-087759550d10");
	  
		 
        }

	                   
        private IUFCard _BuilderControl_Card4(IUFContainer container)
        {
            IUFCard _UFCard = UIControlBuilder.BuildCard(container,"Card4",false,"none", true, true, "0","","ec65b762-206b-4f96-b497-8a3341c97ba7");
			CommonBuilder.GridLayoutPropBuilder(container, _UFCard, 972, 30, 0, 1, 2, 1, "100");
            CommonBuilder.ContainerGridLayoutPropBuilder(_UFCard, 4, 1, 0, 5, 10, 0, 10, 0);
			InitViewBindingContainer(this, _UFCard,  null, "", "", null, 1, "");
			UIControlBuilder.BuildContainerGridLayout(_UFCard, 5,new GridColumnDef[]{new GridColumnDef(100,bool.Parse("True")),new GridColumnDef(10,bool.Parse("True")),new GridColumnDef(100,bool.Parse("True")),new GridColumnDef(1,bool.Parse("False")),},new GridRowDef[]{new GridRowDef(20,bool.Parse("False")),});
            this.Card4 = _UFCard;

            ///foreach UFCard下的所有控件，增加到此容器





				this.OnSelect = UIControlBuilder.BuilderUFButton(_UFCard, true, "OnSelect", true, true, 100, 20, 0, 0, 1, 1, "100","", this.Model.ElementID,"OnSelect",false,"1a03feff-6673-44bf-940c-b4e3dc956e50","1a03feff-6673-44bf-940c-b4e3dc956e50","d1069f99-d256-4dc4-a15d-936d8757e3e4");
	

		
			UIControlBuilder.BuilderUFControl(this.OnSelect, "0");		


				this.OnToSRM = UIControlBuilder.BuilderUFButton(_UFCard, true, "OnToSRM", true, true, 100, 20, 2, 0, 1, 1, "100","", this.Model.ElementID,"OnToSRM",false,"5b13b7ba-f607-4e18-8ed7-23139f4d4aa2","5b13b7ba-f607-4e18-8ed7-23139f4d4aa2","f031f990-1ca9-4598-8a67-309800e411b5");
	

		
			UIControlBuilder.BuilderUFControl(this.OnToSRM, "1");		



		

            
            container.Controls.Add(_UFCard);
            return _UFCard;
        }





		#endregion
		

	}
}
